/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/page',
    method: 'get',
    params: query
  })
}

// 专项工作创建保存
export function saveZhuanxiang(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/saveZhuanxiang',
    method: 'post',
    params: query
  })
}

//评价人列表查询
export function zxpjList(query) {
  ////console.log("id===="+id)
  return request({
    url: '/appr-contract/zxgzchuangjian/zxpjPage',
    method: 'get',
    params: query
  })
}

//参与人列表查询
export function zxcyList(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/zxcyPage',
    method: 'get',
    params: query
  })
}

//通过评分人获取参与人
export function getCyrById(query) {
  return request({
    url: '/appr-contract/zxgzchuangjian/getCyrById',
    method: 'get',
    params: query
  })
}

//保存参与人当前行
export function saveRow(obj) {
  return request({
    url: '/appr-contract/zxgzchuangjian/saveRow',
    method: 'post',
    data: obj
  })
}

export function saveZxgzShCy(obj) {
  return request({
    url: '/appr-contract/zxgzshcy/saveZxgzShCy',
    method: 'post',
    data: obj
  })
}
//获取参与人
export function getCyr(zxid) {
  return request({
    url: '/appr-contract/zxgzcyr/getCyr/' + zxid,
    method: 'get'
  })
}
//获取审核人
export function getShr(zxid) {
  return request({
    url: '/appr-contract/zxgzshr/getShr/' + zxid,
    method: 'get'
  })
}
//获取审核人
export function getZxpfList(zxid) {
  return request({
    url: '/appr-contract/zxgzchuangjian/getZxpfList/' + zxid,
    method: 'get'
  })
}
export function saveCyrBycount(obj) {
  return request({
    url: '/appr-contract/zxgzcyr/saveCyrBycount',
    method: 'post',
    data: obj
  })
}
export function saveShrBycount(obj) {
  return request({
    url: '/appr-contract/zxgzshr/saveShrBycount',
    method: 'post',
    data: obj
  })
}
export function savePfBycount(obj) {
  return request({
    url: '/appr-contract/zxgzchuangjian/savePfBycount',
    method: 'post',
    data: obj
  })
}
// 合同信息返回值
export function page(query) {
  return request({
    url: '/appr-contract/zxgzshcy/page',
    method: 'get',
    params: query
  })
}
//获取审核人
export function getListpfcyr(query) {
  return request({
    url: '/appr-contract/zxgzshcy/getListpfcyr',
    method: 'post',
    data: query

  })
}
export function updateCyshById(id,flag) {
  return request({
    url: '/appr-contract/zxgzshcy/updateCyshById/' + id+'/'+flag,
    method: 'get'
  })
}
export function updateZxgzcysh(query) {
  return request({
    url: '/appr-contract/zxgzshcy/updateZxgzcysh',
    method: 'post',
    data: query
  })
}
//保存参与人打分人信息
export function saveAllInfo(obj) {
  return request({
    url: '/appr-contract/zxgzchuangjian/saveAllInfo',
    method: 'post',
    data: obj
  })
}

